package cn.net.shuxing.yifu.common.util;

import java.util.UUID;

/**
 * redis key生成器
 * 默认类型是string
 */
public class RedisKeyCreator {

    /**
     * 回收服务费比例
     **/
    public static String buyBackServiceFeeRatio() {
        return "buyBackServiceFeeRatio";
    }

    /**
     * 会员最小持有活币数
     **/
    public static String memberKeepAliveCoinMinCount() {
        return "memberKeepAliveCoinMinCount";
    }

    /**
     * 会员最大持有活币数
     **/
    public static String memberKeepAliveCoinMaxCount() {
        return "memberKeepAliveCoinMaxCount";
    }

    /**
     * 暂时不用
     **/
    public static String coinPrice(Integer coinTypeId) {return "coinTypeId:" + coinTypeId + ":price";}


    public static String coinHighestPrice(Integer coinTypeId) {return "coinTypeId:" + coinTypeId + ":coinHighestPrice";}
    public static String coinLowestPrice(Integer coinTypeId) {return "coinTypeId:" + coinTypeId + ":coinLowestPrice";}

    /**
     * 总交易量 类型: hash
     **/
    public static String totalDealCount(Integer coinTypeId) {
        return "totalDealCount:" + coinTypeId;
    }

    public static String totalDealCountUpdateTime(Integer coinTypeId) {
        return "totalDealCount:" + coinTypeId + ":updateTime";
    }

    /**
     * 今日交易量 类型: hash
     **/
    public static String todayDealCount(Integer coinTypeId) {
        return "todayDealCount:" + coinTypeId;
    }

    public static String todayDealCountUpdateTime(Integer coinTypeId) {
        return "todayDealCount:" + coinTypeId + ":updateTime";
    }

    /**
     * 总配发量
     **/
    public static String startGrantTime(Integer coinTypeId) {
        return "coinTypeId:" + coinTypeId + ":startGrantTime";
    }

    public static String verifyCode(String username) {
        return "username:" + username + ":verifyCode";
        //username:15088728888:verifyCode 888888
    }

    public static String login(int userId) {
        return "userId:" + userId + ":login";
    }

    public static String hangBuyObj(int hangBuyId) {
        return "hangBuy:" + hangBuyId + ":Obj";
    }

    public static String hangBuySet() {
        return "hangBuySet";
    }

    public static String hangSaleObj(int hangSaleId) {
        return "hangSale:" + hangSaleId + ":Obj";
    }

    public static String hangSaleSet() {
        return "hangSaleSet";
    }

    public static String capitalPasswordVerifyCodeKey(String phoneNum) {
        return "capitalPasswordVerifyCodeKey:" + phoneNum;
    }


    /**
     * 开盘价
     **/
    public static String openPrice(Integer coinTypeId) {
        return "openPrice:" + coinTypeId;
    }

    public static String openPriceUpdateTime(Integer coinTypeId) {
        return "openPrice:" + coinTypeId + ":updateTime";
    }

    /**
     * 挂卖回购系数
     **/
    public static String hangSaleBuyBackRate() {
        return "hangSaleBuyBackRate";
    }

    /**
     * 挂买出价系数
     **/
    public static String hangBuyOutPriceRate() {
        return "hangBuyOutPriceRate";
    }

    /**
     * 违约金比例
     **/
    public static String penaltyForBreachRate() {
        return "penaltyForBreachRate";
    }

    /**
     * 违约金扣除时间
     **/
    public static String penaltyForBreachTime() {
        return "penaltyForBreachTime";
    }

    /**
     * 回收挂卖系数
     **/
    public static String buyBackSaleRate() {
        return "buyBackSaleRate";
    }

    /**
     * 能否发布挂买单,0表示不能,1表示能
     **/
    public static String ablePublishHangBuy(int userId) {
        return "hangBuy:" + userId + ":ablePublish";
    }

    /**
     * 能否发布挂卖单,0表示不能,1表示能
     **/
    public static String ablePublishHangSale(int userId) {
        return "hangSale:" + userId + ":ablePublish";
    }

    /**
     * 最低挂买单价比例,
     * 挂买单的单价 hangBuy.singlePrice 必须大于开盘价 openPrice的 最低挂买单价比例 minHangBuySinglePriceRate
     * 公式: hangBuy.singlePrice >= openPrice * (1 + minHangBuySinglePriceRate)
     *
     * @return
     */
    public static String minHangBuySinglePriceRate() {
        return "minHangBuySinglePriceRate";
    }


    /**
     * 限价挂卖系数
     *
     * @return
     */
    public static String limitPriceSale() {
        return "limitPriceSale";
    }

    /**
     * 开始配发时间
     **/
    public static String startGrantTime() {
        return "startGrantTime";
    }

    /**
     * 配发间隔
     *
     * @param coinTypeId
     **/
    public static String grantIntervalTime(Integer coinTypeId) {
        return "grantIntervalTime:" + coinTypeId;
    }

    /**
     * 配发间隔
     **/
    public static String grantIntervalTime() {
        return "grantIntervalTime";
    }

    /**
     * 手动买挂卖单队列
     **/
    public static String manualBuyHangSaleQueue() {
        return "manualBuyHangSaleQueue";
    }

    /**
     * 手动卖挂买单队列
     **/
    public static String manualSaleHangBuyQueue() {
        return "manualSaleHangBuyQueue";
    }

    /**
     * 置顶公告
     **/
    public static String stickSys() {
        return "stickSys";
    }

    /**
     * 交易手续费基额
     **/
    public static String dealFeeBaseCount() {
        return "dealFeeBaseCount";
    }

    /**
     * 会员最长允许冻结时间
     **/
    public static String memberMaxAllowFrozenTime() {
        return "memberMaxAllowFrozenTime";
    }

    /**
     * 会员单笔最低出账量
     **/
    public static String memberOnceMinOutCount() {
        return "memberOnceMinOutCount";
    }

    /**
     * 股东最长允许冻结时间
     **/
    public static String shareholderMaxAllowFrozenTime() {
        return "shareholderMaxAllowFrozenTime";
    }

    /**
     * 商家钱包限额
     **/
    public static String sellerWalletLimitCount() {
        return "sellerWalletLimitCount";
    }

//    /**
//     * 交易钱包活币最低持有量
//     **/
//    public static String dealWalletMinCount() {
//        return "dealWalletMinCount";
//    }
//
//    /**
//     * 交易钱包活币最高持有量
//     **/
//    public static String dealWalletMaxCount() {
//        return "dealWalletMaxCount";
//    }

    /**
     * 激活新钱包所需最小活币量
     **/
    public static String activateWalletNeedMinCount() {
        return "activateWalletNeedMinCount";
    }

    /**
     * 激活时间
     **/
    public static String activateTime() {
        return "activateTime";
    }

    /**
     * 会员冻结参数
     **/
    public static String memberFrozenParam() {
        return "memberFrozenParam";
    }

    /**
     * 会员考核周期
     **/
    public static String m_examinationCycle() {
        return "m_examinationCycle";
    }

    /**
     * 股东考核周期
     **/
    public static String s_examinationCycle() {
        return "s_examinationCycle";
    }


    /**
     * 股东解冻回收手续费
     **/
    public static String shareholderThawRecoverFee() {
        return "shareholderThawRecoverFee";
    }

    /**
     * 商家保证金
     **/
    public static String sellerDeposit() {
        return "sellerDeposit";
    }

    /**
     * 商家保证金扣除条件
     **/
    public static String sellerDepositCondition() {
        return "sellerDepositCondition";
    }

    /**
     * 坐空期限
     **/
    public static String shortDeadline() {
        return "shortDeadline";
    }

    /**
     * 会员解冻回收手续费
     **/
    public static String memberThawRecoverFee() {
        return "memberThawRecoverFee";
    }

    /**
     * 股东冻结参数
     **/
    public static String shareholderFrozenParam() {
        return "shareholderFrozenParam";
    }

    /**
     * 交易手续费率
     **/
    public static String dealFeeRatio() {
        return "dealFeeRatio";
    }


    /**
     * 挂买出价系数
     **/
    public static String hangBuyOutPriceRatio() {
        return "hangBuyOutPriceRatio";
    }

    /**
     * 会员动销率
     **/
    public static String m_movingPin() {
        return "m_movingPin";
    }

    /**
     * 股东动销率
     */
    public static String s_movingPin() {
        return "s_movingPin";
    }

    /**
     * 会员最多允许解冻次数
     **/
    public static String memberMaxAllowThawCount() {
        return "memberMaxAllowThawCount";
    }

    /**
     * 激活新钱包所需最大活币量
     **/
    public static String activateWalletNeedMaxCount() {
        return "activateWalletNeedMaxCount";
    }

    /**
     * 回购服务费率
     **/
    public static String buyBackServiceFee() {
        return "buyBackServiceFee";
    }

    /**
     * 坐空次数
     **/
    public static String shortCount() {
        return "shortCount";
    }

    /**
     * 股东最多允许解冻次数
     **/
    public static String shareholderMaxAllowThawCount() {
        return "shareholderMaxAllowThawCount";
    }


    /** 下面的key全为list **/
    /**
     * 交易手续费基额特殊用户列表
     **/
    public static String dealFeeBaseCountSpecialUserList() {
        return "dealFeeBaseCountSpecialUserList";
    }

    /**
     * 会员最长允许冻结时间特殊用户列表
     **/
    public static String memberMaxAllowFrozenTimeSpecialUserList() {
        return "memberMaxAllowFrozenTimeSpecialUserList";
    }

    /**
     * 会员单笔最低出账量特殊用户列表
     **/
    public static String memberOnceMinOutCountSpecialUserList() {
        return "memberOnceMinOutCountSpecialUserList";
    }

    /**
     * 股东最长允许冻结时间特殊用户列表
     **/
    public static String shareholderMaxAllowFrozenTimeSpecialUserList() {
        return "shareholderMaxAllowFrozenTimeSpecialUserList";
    }

    /**
     * 商家钱包限额特殊用户列表
     **/
    public static String sellerWalletLimitCountSpecialUserList() {
        return "sellerWalletLimitCountSpecialUserList";
    }

    /**
     * 交易钱包活币最低持有量特殊用户列表
     **/
    public static String dealWalletMinCountSpecialUserList() {
        return "dealWalletMinCountSpecialUserList";
    }

    /**
     * 激活新钱包所需最小活币量特殊用户列表
     **/
    public static String activateWalletNeedMinCountSpecialUserList() {
        return "activateWalletNeedMinCountSpecialUserList";
    }

    /**
     * 激活时间特殊用户列表
     **/
    public static String activateTimeSpecialUserList() {
        return "activateTimeSpecialUserList";
    }

    /**
     * 会员冻结参数特殊用户列表
     **/
    public static String memberFrozenParamSpecialUserList() {
        return "memberFrozenParamSpecialUserList";
    }

    /**
     * 考核周期特殊用户列表
     **/
    public static String examinationCycleSpecialUserList() {
        return "examinationCycleSpecialUserList";
    }

    /**
     * 股东解冻回收手续费特殊用户列表
     **/
    public static String shareholderThawRecoverFeeSpecialUserList() {
        return "shareholderThawRecoverFeeSpecialUserList";
    }

    /**
     * 商家保证金特殊用户列表
     **/
    public static String sellerDepositSpecialUserList() {
        return "sellerDepositSpecialUserList";
    }

    /**
     * 坐空期限特殊用户列表
     **/
    public static String shortDeadlineSpecialUserList() {
        return "shortDeadlineSpecialUserList";
    }

    /**
     * 会员解冻回收手续费特殊用户列表
     **/
    public static String memberThawRecoverFeeSpecialUserList() {
        return "memberThawRecoverFeeSpecialUserList";
    }

    /**
     * 股东冻结参数特殊用户列表
     **/
    public static String shareholderFrozenParamSpecialUserList() {
        return "shareholderFrozenParamSpecialUserList";
    }

    /**
     * 交易手续费率特殊用户列表
     **/
    public static String dealFeeRatioSpecialUserList() {
        return "dealFeeRatioSpecialUserList";
    }

    /**
     * 交易钱包活币最高持有量特殊用户列表
     **/
    public static String dealWalletMaxCountSpecialUserList() {
        return "dealWalletMaxCountSpecialUserList";
    }

    /**
     * 挂买出价系数特殊用户列表
     **/
    public static String hangBuyOutPriceRatioSpecialUserList() {
        return "hangBuyOutPriceRatioSpecialUserList";
    }

    /**
     * 动销率特殊用户列表
     **/
    public static String movingPinSpecialUserList() {
        return "movingPinSpecialUserList";
    }

    /**
     * 会员最多允许解冻次数特殊用户列表
     **/
    public static String memberMaxAllowThawCountSpecialUserList() {
        return "memberMaxAllowThawCountSpecialUserList";
    }

    /**
     * 激活新钱包所需最大活币量特殊用户列表
     **/
    public static String activateWalletNeedMaxCountSpecialUserList() {
        return "activateWalletNeedMaxCountSpecialUserList";
    }

    /**
     * 回购服务费率特殊用户列表
     **/
    public static String buyBackServiceFeeSpecialUserList() {
        return "buyBackServiceFeeSpecialUserList";
    }

    /**
     * 坐空次数特殊用户列表
     **/
    public static String shortCountSpecialUserList() {
        return "shortCountSpecialUserList";
    }

    /**
     * 股东最多允许解冻次数特殊用户列表
     **/
    public static String shareholderMaxAllowThawCountSpecialUserList() {
        return "shareholderMaxAllowThawCountSpecialUserList";
    }

    public static String loginPasswordVerifyCodeKey(String userNum) {
        return "loginPasswordVerifyCodeKey:" + userNum;
    }

    public static String bindPhoneVerifyCode(String phoneNum) {
        return "bindPhoneVerifyCode:" + phoneNum;
    }

    public static String loginVerifyCode(String username) {
        return "loginVerifyCode:" + username;
    }

    public static String registPasswordVerifyCodeKey(String username) {
        return "registPasswordVerifyCodeKey:" + username;
    }

    public static String findPasswordVerifyCodeKey(String username) {
        return "findPasswordVerifyCodeKey:" + username;
    }

    //每日固定上涨系数(单价涨幅设置)
    public static String CoinRatioD(Integer coinTypeId) {
        return "CoinRatioD:" + coinTypeId;
    }

    public static String activateQueue() {
        return "activateQueue";
    }

    public static String loginProcess(Integer userId) {
        return "loginProcess:" + userId;
    }

    public static String userMarkImagePoint(Integer userId) {
        return "userMarkImagePoint:" + userId;
    }

    //    userDeleteReturnMoneyFeeSpecialUserList
    //销户回收手续费
    public static String userDeleteReturnMoneyFee() {
        return "userDeleteReturnMoneyFee";
    }

    public static String userDeleteReturnMoneyFeeSpecialUserList() {
        return "userDeleteReturnMoneyFeeSpecialUserList";
    }

    public static String returnMoneyFeeRatio() {
        return "returnMoneyFeeRatio";
    }

    public static String exchangeRate() {
        return "exchangeRate";
    }

    public static String ethExchangeRate() {
        return "ethExchangeRate";
    }

    public static String systemMessage(Integer userId) {
        return "systemMessage:" + userId;
    }

    public static String sliderImagePosition(int index) {
        return "sliderImagePosition" + index;
    }

    public static String currentMarkImageIndex() {
        return "currentMarkImageIndex";
    }

    public static String currentMarkImageDeleteIndex() {
        return "currentMarkImageDeleteIndex";
    }

    public static String sliderImageUrl(int index) {
        return "sliderImageUrl" + index;
    }

    public static String originImageUrl(int index) {
        return "originImageUrl" + index;
    }

    /**
     * 会员考核周期
     **/
    public static String memberExaminationCycle(Integer coinTypeId) {
        return "memberExaminationCycle";
    }

    /**
     * 会员动销率
     **/
    public static String memberMovingPin(Integer coinTypeId) {
        return "memberMovingPin";
    }

    /**
     * 股东考核周期
     **/
    public static String shareholderExaminationCycle(Integer coinTypeId) {
        return "shareholderExaminationCycle" + coinTypeId;
    }

    /**
     * 股东动销率
     **/
    public static String shareholderMovingPin(Integer coinTypeId) {
        return "shareholderMovingPin" + coinTypeId;
    }

    /**
     * 会员考核周期特殊用户列表
     **/
    public static String memberExaminationCycleSpecialUserList(Integer coinTypeId) {
        return "memberExaminationCycleSpecialUserList" + coinTypeId;
    }

    /**
     * 会员动销率特殊用户列表
     **/
    public static String memberMovingPinSpecialUserList(Integer coinTypeId) {
        return "memberMovingPinSpecialUserList" + coinTypeId;
    }

    /**
     * 股东考核周期特殊用户列表
     **/
    public static String shareholderExaminationCycleSpecialUserList(Integer coinTypeId) {
        return "shareholderExaminationCycleSpecialUserList" + coinTypeId;
    }

    /**
     * 股东动销率特殊用户列表
     **/
    public static String shareholderMovingPinSpecialUserList(Integer coinTypeId) {
        return "shareholderMovingPinSpecialUserList" + coinTypeId;
    }

    public static String transferKey(Integer userId) {
        return "transferKey" + UUID.randomUUID().toString().substring(0, 5) + userId;
    }

    public static String verifyCapitalPasswordCode(Integer userId) {
        return "verifyCapitalPasswordCode" + userId;
    }

    public static String bindMailVerifyCode(Integer userId) {
        return "bindMailVerifyCode" + userId;
    }

    public static String unbindPhoneVerifyCode(String phoneNum) {
        return "unbindPhoneVerifyCode" + phoneNum;
    }

    public static String unbindMailVerifyCode(String mail) {
        return "unbindMailVerifyCode" + mail;
    }

    public static String shortStartTime(Integer userId) {
        return "shortStartTime" + userId;
    }

    public static String capitalPasswordErrorCount(Integer userId) {
        return "capitalPasswordErrorCount" + userId;
    }

    public static String userWithdrawFeeRatio() {
        return "userWithdrawFeeRatio";
    }

    public static String coinType(int coinTypeId) {
        return "coinType:" + coinTypeId;
    }

    public static String userLanguage(Integer userId) {
        return "language:" + userId;
    }

    /**
     * 最低充值额度
     */
    public static String rechargeBaseCount() {
        return "rechargeBaseCount";
    }

    /**
     * 充值超时时间
     */
    public static String rechargeOverTime() {
        return "rechargeOverTime";
    }

    /**
     * 最低提现额度
     */
    public static String withdrawBaseCount() {
        return "withdrawBaseCount";
    }

    //冻结回购手续费
    public static String s_frozenBuyBackFee() {
        return "s_frozenBuyBackFee";
    }

    public static String m_frozenBuyBackFee() {
        return "m_frozenBuyBackFee";
    }

    //首页数据
    public static String statisticalList() {
        return "statisticalList";
    }

    //平台概况 交易统计
    public static String surverDealList() {
        return "surverDealList";
    }

    //配发及释放统计
    public static String surverDivlList() {
        return "surverDivlList";
    }

    //会员最大冻结次数
    public static String memberFrozenMaxCount() {
        return "memberFrozenMaxCount";
    }

    //股东最大冻结次数
    public static String shareholderFrozenMaxCount() {
        return "shareholderFrozenMaxCount";
    }


    //K线图时间区间 计算起始时间
    public static String kLineEndTimeMinutesOne() {
        return "kLineEndTimeMinutesOne";
    }
    public static String kLineEndTimeMinutesFive() {
        return "kLineEndTimeMinutesFive";
    }
    public static String kLineEndTimeMinutesfifteen() {
        return "kLineEndTimeMinutesfifteen";
    }
    public static String kLineEndTimeMinutesThirty() {
        return "kLineEndTimeMinutesThirty";
    }
    public static String kLineEndTimeHourOne() {
        return "kLineEndTimeHourOne";
    }
    public static String kLineEndTimeHourTwo() {
        return "kLineEndTimeHourTwo";
    }
    public static String kLineEndTimeHourFour() {
        return "kLineEndTimeHourFour";
    }
    public static String kLineEndTimeHourEight() {
        return "kLineEndTimeHourEight";
    }
    public static String kLineEndTimeDayOne() {
        return "kLineEndTimeDayOne";
    }
    public static String kLineEndTimeDaySeven() {
        return "kLineEndTimeDaySeven";
    }
    public static String kLineEndTimeMonthOne() {
        return "kLineEndTimeMonthOne";
    }


    /**
     * 参数整理 :
     *  统一的:
     *      配发周期
     *      挂卖系数:
     *          限价挂卖
     *          回收挂卖
     *
     *  非统一的(可针对用户具体设置,redis里只是保存一个默认值):
     *      股东交易手续费
     *      股东冻结参数:
     *          考核周期
     *          动销率
     *      会员交易手续费
     *      回购服务费率
     *      交易（会员）钱包容量最小值
     *      交易（会员）钱包容量最大值
     *      挂买出价系数
     *      新钱包激活参数:
     *          激活所需活币最小值
     *          激活所需活币最大值
     *          激活时间
     *          坐空次数
     *          使用期限
     *      会员冻结参数:
     *          考核周期
     *          动销率
     */
}